<?php echo '<?xml version="1.0" encoding="UTF-8"?>' ?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<?php if (!empty($this->nodes)) : ?>
     <?php foreach ($this->nodes as $node) : ?>
        <url>
            <loc>
                <?php if (!empty($node->url_alias)) : ?>
                    <?php echo $this->siteUrl().htmlspecialchars($this->fixUrl('page/'.$node->url_alias)) ?>.html
                <?php else : ?>
                    <?php echo $this->siteUrl().htmlspecialchars($this->fixUrl('node/id/'.$node->id)) ?>
                <?php endif; ?> 
            </loc>
            <changefreq>daily</changefreq>
            <priority>1</priority>
         </url>
      <?php endforeach; ?>
<?php endif; ?>

</urlset>